
<div class="global-header clearfix">
  <div class="global-header-container container"><a title="{{$city->name}}爱上租，让租房简单有趣！" href="{{url('/')}}" class="logo"><img src="{{web_static('pc/v3/assets/logo.jpg')}}" alt="{{$city->name}}公寓出租租房网站"/></a>
    <div class="city"><i>{{$city->name}}</i><span class="current-city icon icon-arrowDown"></span></div>
    <div class="download-app"><a href="{{seo_url(\Common\Define\Route\WebRoute::DOWNLOAD)}}" class="current-app icon icon-app"><span>APP下载</span></a></div>
    <div class="nav clearfix">
      @foreach (Common\Define\View\WebNav::items() as $item)<a href="{{seo_url($item['url'])}}" class="nav-item @if(in_array($url->getSegment(1),$item['active'])) active @endif">{{$item['name']}}</a>
      @endforeach
    </div>
    <div class="select-city">
      <div class="select-city-container">
        <ul>
          @foreach (Common\Model\Com\City::getAllCity() as $item)
          @if(in_array($url->getSegment(1), \Common\Define\View\WebCitySwitch::items()))
            @php $cityUrl = $url->withSubDomain($item->identifier)->withPath($url->getSegment(1))->withoutQueryParameter('q')->toString() @endphp
          @elseif(in_array($url->getSegment(1), \Common\Define\View\WebCitySwitch::items2()))
            @php $cityUrl = $url->withSubDomain($item->identifier)->withPath($url->getSegment(1).'/'.$url->getSegment(2))->withoutQueryParameter('q')->toString() @endphp
          @elseif(in_array($url->getSegment(1), array('zhuanti')))
            @php $cityUrl = $url->withSubDomain($item->identifier)->withPath($url->getSegment(1).'/'.str_replace($city->identifier,$item->identifier,$url->getSegment(2)))->withoutQueryParameter('q')->toString() @endphp
          @else
            @php $cityUrl = $url->withSubDomain($item->identifier)->withPath('')->withoutQueryParameter('q')->toString() @endphp
          @endif
          <li><a href="{{$cityUrl}}" class="city-item @if($city->id == $item->id) active @endif">{{$item->name}}</a></li>
          @endforeach
        </ul>
      </div>
    </div>
  </div>
</div>